/*
 * @Author: your name
 * @Date: 2021-01-21 22:25:09
 * @LastEditTime: 2021-01-25 17:19:14
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \ad-api\routes\admin\page.js
 */
const express = require('express');
const router = express.Router();
const Result = require('../../models/result.js');
const { getPageListService} = require('../../service/pageService')
//获取页面列表
router.post('/list', async (req, res, next)=>{
           const { page_id } = req.body
           const {results ,status} = await getPageListService(page_id)
           if(status){
            new Result(results , "查询成功").success(res)
           }else{
            new Result({},'服务器错误,查询失败').fail(res)
           }
})
module.exports = router;